home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / comms_w / inetv21.zip / WSASLIP.SC_ / WSASLIP.SC
Text File  |  1995-01-06  |  2KB  |  76 lines

  1. #
  2. #
  3. #    Internet-Connect (TM) SLIP/PPP Startup Script Sample
  4. #
  5. # Each script line has the following general syntax
  6. #    command arg1 arg2 ...
  7. # Null line or line started with # is ignored (comment line)
  8. # Number of arguments following each command depends on the command.
  9. # An argument may be an integer or a text string. If a text string
  10. #    contains spaces, it must be enclosed in quotes (").
  11. # Valid commands are:
  12. #    done            -end script normally
  13. #    fail            -terminate script abnormally
  14. #    goto label_name     -jump to script line with label_name
  15. #    label label_name    -label a script line
  16. #    pause pause_in_secs    -short wait
  17. #    raisedtr
  18. #    dropdtr
  19. #    setcr [CarriageReturn_character] -default is \r
  20. #    launch application_to_be_launched [goto_if_fail]
  21. #    timeout default_timeout_in_secs
  22. #    expect "expect_string" [timeout_in_secs [label_to_go_to_if_timeout]]
  23. #    expectaddr [timeout_in_secs [label_to_go_to_if_timeout]]
  24. #    send "send_string"    -send a string to host (CR appended automatically)
  25. #    sendpass "password"    -send a password (will not write to log)
  26. #    send $variable        -prompt for variable string then send it to host
  27. #    expect $variable [timeout_in_secs [label_to_go_if_timeout]]
  28. # where $variable:
  29. #    $p (password, send only)
  30. #    $l (local IP address, expect only)
  31. #    $r (remote IP address, expect only)
  32. #    $c (any command, e.g. start SLIP, send only)
  33. #    $u (userid, send only)
  34. #
  35. # Note that text string must be in quotes if contains spaces, e.g.
  36. #    expect "Please enter user-id"
  37. #
  38. #
  39. timeout 45
  40. send AT&F&D0V1
  41. expect OK 60 failexit
  42. pause 1
  43. send ATDT9-123-1234567
  44. expect "CONNECT" 60 failexit
  45. # Send some CR's to solicit a login prompt from host
  46. send ""
  47. send ""
  48. expect ogin: 30 failexit
  49. # Wait a bit here. Some Unix systems expect a brief delay
  50. # between the time the prompt is sent out and user-is is
  51. # entered
  52. #pause 1
  53. #send my_userid
  54. send $u
  55. expect assword: 30 failexit
  56. # Wait a bit here. Some Unix systems expect a brief delay
  57. # between the time the prompt is sent out and password is
  58. # entered
  59. #pause 1
  60. #sendpass my_password
  61. sendpass $p
  62. # Login is successful, expect greetings string
  63. #expect opyrigh 30 failexit
  64. #send ""
  65. #send ""
  66. #pause 5
  67. # Prompt for then send a command to start up SLIP
  68. #send $c
  69. # get host (remote) IP address
  70. #expect $r
  71. # Wait a bit to give host time to setup
  72. pause 1
  73. done
  74. label failexit
  75. fail
  76.